<%@page import="com.yifeng.dto.IDtoRow"%>
<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@page import="com.yifeng.dto.DtoTable"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%><%@ taglib prefix="s" uri="/struts-tags"%>
<%-- 头部导航栏 --%>
<script type="text/javascript">
    function show(content) {
	helper.confirm('滚动新闻内容：', content, null);
    }

    $(function() {
	$('#scrollingTicker').totemticker({
	    row_height : '12px',
	    next : '#ticker-next',
	    previous : '#ticker-previous',
	    mousestop : true,
	});
    });
</script>
<style type="text/css">
<!--
#scrollingTicker {
	height: 12px;
	width: 20em;
	overflow: hidden;
	margin: 0;
	display: inline-block;
	line-height: 12px;
}

#scrollingTicker li {
	line-height: 12px;
}
-->
</style>
<div id="topBanner">
	<a id="logo" href="<s:url value="/default.do" />">
		<img src="<s:url value="%{companyLogo}" />" alt="工作云企业端" />
	</a>
	<div id="settings">
		<div class="btn-group">
			<a class="btn" href="<s:url value="/default.do" />">
				<i class="icon16 home16"></i>桌面
			</a>
			<a class="btn" href="<s:url value="/base/user/modifyPassword" />">
				<i class="icon16 options16"></i>修改密码
			</a>
			<a class="btn" href="javascript:logout()">
				<i class="icon16 jump16"></i>退出
			</a>
		</div>
	</div>
	<div id="navBar">
		<ul class="nav nav-pills">
			<s:iterator value="menu.catalogs" var="catalog" status="status">
				<s:url id="url" value="%{menu.getSubResources(#catalog)[0].url}"></s:url>
				<li <s:if test="menu.isCurrentParent(#catalog)">class="active"</s:if>><a href="<s:property value="#url" />">
						<s:property value="title" />
					</a></li>
			</s:iterator>
		</ul>
	</div>
</div>
<div class="row-fluid" style="background: #F5F5F5; padding-top: 0.5em; margin-bottom: 0.2em; border-bottom: 1px solid #DEDEDE;">
	<div class="offset5 span15">
		欢迎您：
		<a href="#" title="${profileInfo.user.userId}">${profileInfo.user.name}</a>
		<span class="divider" title="所属角色"> ( <s:iterator value="profileInfo.roles" var="role" status="status">
				<s:property value="name" />
				<s:if test="!status.last">,</s:if>
			</s:iterator> )
		</span>
	</div>
	<div class="offset15 span25">
		滚动新闻：
		<ul id="scrollingTicker">
			<s:iterator value="scrollings" var="scrolling">
				<li><a href="javascript:show('${scrolling.CONTENT}')">
						<s:if test="#scrolling.content.length() >= 15">
							<s:property value="scrolling.content.substring(0,15)" />...</s:if>
						<s:else>${scrolling.content}</s:else>
					</a></li>
			</s:iterator>
		</ul>
		<a href="<s:url value="/scrolling/listScrolling"/>">更多</a>
	</div>
</div>